using System;
using UnityEngine;

[Serializable]
public class tomarket : MonoBehaviour
{
	public GUITexture gui;

	public Texture pressed;

	public Texture unpressed;

	public AudioClip clip;

	public void Update()
	{
		if (UnityEngine.Input.touchCount > 0)
		{
			Touch touch = Input.touches[0];
			if (touch.phase == TouchPhase.Began && GetComponent<GUITexture>().HitTest(touch.position))
			{
				AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
				gui.texture = pressed;
				UnityEngine.SceneManagement.SceneManager.LoadScene("market");
			}
		}
		if (UnityEngine.Input.touchCount == 0)
		{
			gui.texture = unpressed;
		}
	}

	public void Main()
	{
	}
}
